﻿/* 
 * author: www.cnblogs.com/luminji
 * date  : 2011/12/28
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Luminji.Exam.Model.PaperTemplates
{
    public class PaperTemplatePart
    {
        public PaperTemplatePart()
        {
            CreatedDateTime = new DateTime(2000, 1, 1);
            LastModifyDateTime = new DateTime(2000, 1, 1); ;
        }

        public string PaperTemplatePartCode { get; set; }
        public string PaperTemplatePartName { get; set; }
        public string PaperTemplateCode { get; set; }
        public string QuestionUnitCode { get; set; }
        public string QuestionUnitTemplateCode { get; set; }
        public int QuestionFaceNumber { get; set; }
        public int QuestionStemNumber { get; set; }
        public float QuestionScoreNumber { get; set; }
        public int OrderValue { get; set; }
        public int CompeteValue { get; set; }
        public string Descriptions { get; set; }
        public string CreatorCode { get; set; }
        public DateTime CreatedDateTime { get; set; }
        public DateTime LastModifyDateTime { get; set; }

        public override bool Equals(object obj)
        {
            var pt = obj as PaperTemplatePart;
            return (this.PaperTemplatePartCode == pt.PaperTemplatePartCode && this.PaperTemplatePartName == pt.PaperTemplatePartName);
        }

        public override int GetHashCode()
        {
            return (this.PaperTemplatePartCode + this.PaperTemplatePartName).GetHashCode();
        }
    }
}
